package com.wanxi.test;

public class Parent {
    protected Integer id;
    private String name;
    private Integer age;

    public Object eat(String name) {
        System.out.println("吃饭");
        return "";
    }

    protected Parent() {
        System.out.println("父类的无参数构造方法");
    }

    public Parent(String name, Integer age) {
        System.out.println("父类的有参数构造方法");
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
